From: Keir Fraser Date: Tue, 16 Jun 2009 10:33:23 +0000 (+0100) Subject: xend: pass-through: Only call setupOneDevice() once per device X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13772 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=678e6d8b30787c7e848b38197162992ec38bc8ce;p=xen.git xend: pass-through: Only call setupOneDevice() once per device As observed by Dexuan Cui, when PCI devices are passed through at domain-creation-time setupOneDevice() will be called twice. Once via setupDevice() and once via econfigureDevice() which is called in pci_device_configure(). This patch removes the first of these. Cc: Dexuan Cui Cc: Masaki Kanno Signed-off-by: Simon Horman --- diff --git a/tools/python/xen/xend/server/pciif.py b/tools/python/xen/xend/server/pciif.py index fb182ade5c..b8a60cd1ea 100644 --- a/tools/python/xen/xend/server/pciif.py +++ b/tools/python/xen/xend/server/pciif.py @@ -436,8 +436,6 @@ class PciController(DevController): ' same guest with %s' raise VmError(err_msg % (s, dev.name)) - for (domain, bus, slot, func) in pci_dev_list: - self.setupOneDevice(domain, bus, slot, func) wPath = '/local/domain/0/backend/pci/%u/0/aerState' % (self.getDomid()) self.aerStateWatch = xswatch(wPath, self._handleAerStateWatch) log.debug('pci: register aer watch %s', wPath)